import request from '@/utils/request'

export function getUploadUrl() {
  return process.env.VUE_APP_BASE_API + '/upload_file'
}

export function getBatchUploadUrl() {
  return process.env.VUE_APP_BASE_API + '/upload_files'
}

export function getUploadOssSign(data) {
    return request({
        url: '/upload_oss_sign',
        method: 'post',
        data

    })
}
export function uploadOssFilePath(data) {
    return request({
        url: '/add_oss_file',
        method: 'post',
        data

    })
}
export function setUploadOssFile(data) {
    return request({
        url: '/add_oss_file',
        method: 'post',
        data

    })
}

/**
 * @description 云存储 url 上传
 * @param {Object} param data {Object} 传值参数
 */
export function ossUpload(url, data) {
    return request({
        url:url,
        method: 'post',
        body:data
    });
}



export function getMonthLists() {
    return request({
        url: '/get_month_lists',
        method: 'get'
    })
}

export function checkPermission(apis) {
    return request({
        url: '/check-permission',
        method: 'get',
        params:{
            apis
        }
    })
}
